package com.edou.member.task;

import javax.annotation.Resource;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Component;

import com.edou.member.service.IMemberLoginTokenService;

/**
 * 检测APP会员是否在线定时器
 * @creator     admin
 * @create-time 2016年8月3日   下午4:40:42
 * @email admin@edou.com
 * @company www.edou.com
 * @version 1.0
 */
@Component("checkAppMemberOnlineTask")
public class CheckAppMemberOnlineTask {

	private Log logger = LogFactory.getLog(CheckAppMemberOnlineTask.class);
	
	@Resource(name = "memberLoginTokenServiceImpl")
	private IMemberLoginTokenService memberLoginTokenService;

	/**
	 * 检测APP会员是否在线
	 */
	public void checkAppMemberOnlineStatus(){
		logger.debug("检测APP会员是否在线...");
		memberLoginTokenService.updateMemberOfflineByLastAccessTime();
	}
}
